package com.pajk.user.model;

import java.io.Serializable;
import java.util.Date;


public class CreditHis extends Entity
implements Serializable{

    private String actionId;
    private Long userId;
    private Integer credit;
    private String actionCode;
    private String appFrom;
    private Date actionTime;
    private Integer sync;

    public String getActionId() {
        return actionId;
    }

    protected void setActionId(String actionId) {
        this.actionId = actionId;
    }

    public Long getUserId() {
        return userId;
    }

    protected void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getCredit() {
        return credit;
    }

    protected void setCredit(Integer credit) {
        this.credit = credit;
    }
 
    public String getActionCode() {
        return actionCode;
    }

    protected void setActionCode(String actionCode) {
        this.actionCode = actionCode;
    }

    public String getAppFrom() {
        return appFrom;
    }

    protected void setAppFrom(String appFrom) {
        this.appFrom = appFrom;
    }

    public Date getActionTime() {
        return actionTime;
    }

    protected void setActionTime(Date actionTime) {
        this.actionTime = actionTime;
    }

    public Integer getSync() {
        return sync;
    }

    protected void setSync(Integer sync) {
        this.sync = sync;
    }

    public CreditHis() {  }

    public CreditHis(CreditHis his) {
        this.actionId = his.actionId;
        this.userId = his.userId;
        this.credit = his.credit;
        this.actionCode = his.actionCode;
        this.appFrom = his.appFrom;
        this.actionTime = his.actionTime;
        this.sync = his.sync;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof CreditHis)) return false;

        CreditHis that = (CreditHis) o;

        if (actionCode != null ? !actionCode.equals(that.actionCode) : that.actionCode != null) return false;
        if (actionId != null ? !actionId.equals(that.actionId) : that.actionId != null) return false;
        if (actionTime != null ? !actionTime.equals(that.actionTime) : that.actionTime != null) return false;
        if (appFrom != null ? !appFrom.equals(that.appFrom) : that.appFrom != null) return false;
        if (credit != null ? !credit.equals(that.credit) : that.credit != null) return false;
        if (sync != null ? !sync.equals(that.sync) : that.sync != null) return false;
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = actionId != null ? actionId.hashCode() : 0;
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (credit != null ? credit.hashCode() : 0);
        result = 31 * result + (actionCode != null ? actionCode.hashCode() : 0);
        result = 31 * result + (appFrom != null ? appFrom.hashCode() : 0);
        result = 31 * result + (actionTime != null ? actionTime.hashCode() : 0);
        result = 31 * result + (sync != null ? sync.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "CreditHisDO{" +
                "actionId='" + actionId + '\'' +
                ", userId=" + userId +
                ", credit=" + credit +
                ", actionCode='" + actionCode + '\'' +
                ", appFrom='" + appFrom + '\'' +
                ", actionTime=" + actionTime +
                ", sync=" + sync +
                '}';
    }

}
